﻿using Domain.Entity.ord;
using Domain.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Domain.IRepository
{
    public interface IPurchaseReturn_hRepository
    {
        //分页查询进货退货单
        Task<FenYe<PurchaseReturn_h>> GetPurchaseReturn_h(FenYe<PurchaseReturn_h> fenYe, string? code, int? status, int? sup, string? starttime, string? endtime);

        //高级查询
        Task<FenYe<PurchaseReturn_h>> GetAdvancedPurchaseReturn_h(FenYe<PurchaseReturn_h> fenYe, string? code, string? starttotal, string? endtotal, string? startdate, string? enddate, string? startnum, string? endnum, int? status, int? sup, string? suplink, string? purcode, int? dep, int? user, string? createname, string? startcreatetime, string? endcreatetime, string? approvername, string? startapprovertime, string? endapprovertime);

        //添加进货退货单
        Task<int> AddPurchaseReturn_h(PurchaseReturn_h purchaseReturn_H);

        //根据id查询信息
        Task<PurchaseReturn_h> GetPurchaseReturn_hById(int purtId);

        //修改进货退货单
        Task<int> UpdatePurchaseReturn_h(PurchaseReturn_h purchaseReturn_H);

        //删除进货退货单
        Task<int> DeletePurchaseReturn_h(int id);

        //审核
        Task<int> ApproverPurchaseReturn_h(int purtid, int status, string approvername, string approvertime);

        //撤销
        Task<int> UpdateStatus(int purtid, int status);

        //查询所有单据
        Task<List<PurchaseReturn_h>> GetAllPurchaseReturn_h();

        //根据编号查询信息
        Task<PurchaseReturn_h> GetPurchaseReturn_hByCode(string code);

        //更新出库数量及状态
        Task<int> UpdateNum(int purtid, int oknum, int nonum, int statu);

        //根据关联单号查询退货记录
        Task<List<PurchaseReturn_h>> GetPurchaseReturn_hs(string purcode);
    }
}
